home *** CD-ROM | disk | FTP | other *** search
- on BuscaCd
- global nIdioma, Unidad, NumCd, sPathIni, bDebug
- set CD to char 1 to 1 of Unidad
- openXLib(sPathIni & "dllglue")
- set gBox to dllglue(mnew, "USER.EXE", "MessageBox", "I", "WSSW")
- case nIdioma of
- 1:
- set Mensaje to "Introduzca el CD-ROM " & NumCd
- set MensErr to "Un problema serio a ocurrido. La aplicación se terminará."
- 2:
- set Mensaje to "Insérer le CD-ROM " & NumCd
- set MensErr to "Un problème grave vient de se produire. L' application se fermerá."
- 3:
- set Mensaje to "Insert CD-ROM " & NumCd
- set MensErr to "A serious error has occured. Application terminating."
- end case
- openXLib(sPathIni & "fileio")
- if Unidad <> EMPTY then
- set Tentativas to 1
- repeat while Tentativas <= 2
- if NumCd = 1 then
- set Fichero to fileio(mnew, "read", CD & ":\VTM\MOD-1.DXR")
- else
- set Fichero to fileio(mnew, "read", CD & ":\VTM\MOD-5.DXR")
- end if
- if objectp(Fichero) then
- gBox(mdispose)
- closeXLib(sPathIni & "dllglue")
- Fichero(mdispose)
- closeXLib(sPathIni & "fileio")
- return CD & ":"
- else
- set result to gBox(mCall, 0, Mensaje, EMPTY, 33)
- if result = 2 then
- gBox(mdispose)
- closeXLib(sPathIni & "dllglue")
- closeXLib(sPathIni & "fileio")
- return EMPTY
- end if
- end if
- set Tentativas to 2
- end repeat
- if objectp(Fichero) then
- Fichero(mdispose)
- end if
- end if
- if bDebug then
- set Lista to ["C", "D", "E", "F"]
- else
- set Lista to []
- set gdriveList to ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
- set gdriveType to dllglue(mnew, "KRNL386.EXE", "GetDriveType", "W", "I")
- set result to 0
- repeat with x = 0 to 25
- set result to gdriveType(mCall, x)
- if result = 4 then
- add(Lista, getAt(gdriveList, x + 1))
- end if
- end repeat
- gdriveType(mdispose)
- end if
- repeat while 1
- repeat with x = 1 to count(Lista)
- set CD to getAt(Lista, x)
- if NumCd = 1 then
- set Fichero to fileio(mnew, "read", CD & ":\MODULOS\MOD-1.DXR")
- else
- set Fichero to fileio(mnew, "read", CD & ":\MODULOS\MOD-5.DXR")
- end if
- if objectp(Fichero) then
- gBox(mdispose)
- closeXLib(sPathIni & "dllglue")
- Fichero(mdispose)
- closeXLib(sPathIni & "fileio")
- return CD & ":"
- end if
- end repeat
- set result to gBox(mCall, 0, Mensaje, EMPTY, 33)
- if result = 2 then
- gBox(mdispose)
- closeXLib(sPathIni & "dllglue")
- closeXLib(sPathIni & "fileio")
- return EMPTY
- end if
- end repeat
- end
-